package com.qt.myio;

import java.io.*;

/**
 * @Author zsf
 * @Date 2023/9/25 23:58
 * @Version 1.0
 */
public class FileEncry {

    /**
     * 文件加密=====一个二进制的 异或同一个数两次之后 得到的是同一个数
     * @param args
     */
    public static void main(String[] args) throws IOException {

        /*File src = new File("image/dizhu.png");
        File encry = new File("image/encry.png");*/
        File src = new File("image/encry.png");
        File encry = new File("image/jiemi.png");

        FileInputStream fis = new FileInputStream(src);
        FileOutputStream fos = new FileOutputStream(encry);

        int len;
        while((len = fis.read()) != -1){
            //异或
            fos.write(len ^ 6);
        }
        fos.close();
        fis.close();



    }

}
